package org.springblade.oa.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springblade.oa.entity.Message;

import java.util.List;
import java.util.Map;

public interface MessageMapper extends BaseMapper<Message> {
	/*
	 * 消息提醒
	 * zhangxl 2020-02-04
	 */

	List<Map<String, Object>> getData(Map<String, Object> map);

	/**
	 * 新增
	 * zhangxl 2020-02-05
	 *
	 * @return boolean
	 */
	Integer add(Message msg);

	/**
	 * 修改
	 * zhangxl 2020-02-05
	 *
	 * @return boolean
	 */
	Integer update(Message msg);

	/**
	 * 删除
	 * zhangxl 2020-02-05
	 *
	 * @return boolean
	 */
	Integer delete(Integer id);

	/**
	 * 根据id 获取 信息
	 * zhangxl 2020-02-05
	 */
	Message getMsgById(Integer id);

	/**
	 * 获取 消息数据
	 * zhangxl
	 * 2020-02-05
	 *
	 * @param map sql 参数
	 * @return
	 */
	List<Map<String, Object>> getMsgData(Map<String, Object> map);

	/**
	 * 获取 消息总条数
	 * zhangxl
	 * 2020-02-05
	 *
	 * @param map sql 参数
	 * @return
	 */
	Integer getMsgCount(Map<String, Object> map);

}
